package com.aspire.boc.mms.gwcmp.util.enums;

/**
 * 计费类型枚举
 * 1.包月 2.按条 3.包年
 * @author liming
 *
 */
public enum BillingType {

	MONTH("1","包月"),ITEM("2", "按条"), YEAR("3", "包年");
	
    private BillingType(String id, String strValue) {
    	this.strKey = id;
        this.strValue = strValue;
    }

    private String strKey;
    private String strValue;

    public static BillingType getResStringByKey(String strKey) {
    	
        for (BillingType item : values()) {
            if (item.strKey.equals(strKey))
                return item;
        }
        return null;
    }
    
    public static BillingType getResStringByValue(String strValue) {
    	
        for (BillingType item : values()) {
            if (item.strValue.equals(strValue))
                return item;
        }
        return null;
    }

    public String getStrValue() {

        return strValue;
    }
}
